You can have nested objects in a class other than the one marked with companion. One option is to give the nested object a name, the way you would with a top-level object. You can then reference the nested object via dot notation, as if it were a property.

You can learn more about this in:
Run Edit